<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h2>这是修改页面</h2>
	<form action="type.action?methodName=doAddType" method="post">
		<table class="querytable" align="center" width="50%">
			<tr>
				<th class="textright">类型名称：</th>
				<td class="textleft">
					<input type="text" name="typeName" value="${type.typeName }"/>
					<input type="hidden" name="typeId" value="${type.typeId }"/>
				</td>
				<td id="tn"></td>
			</tr>
			<tr>
				<td colspan="3" align="center">
					<input type="submit" value="保存车型信息" />
					<input type="button" value="返回" onclick="window.history.go(-1)" />
				</td>
			</tr>
		</table>
	</form>

</body>
	<link rel="stylesheet" href="${pageContext.request.contextPath }/css/editTablestyles.css" />
	<script type="text/javascript" src="${pageContext.request.contextPath }/webjars/jquery/1.12.4/jquery.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/listTable.js"></script>
	<script type="text/javascript">
		$(function(){
			$("form").click(function(){
			var typeName=$("input[name='typeName']").val();
			if(typeName=="") {
				$("#tn").html("类型名不能为空！");
				return false;
			}
				
			});
		});
	
	</script>



</html>